// 分销商等级
export const DISTRIBUTOR_LEVELS = {
  BRONZE: 'bronze',
  SILVER: 'silver',
  GOLD: 'gold',
  DIAMOND: 'diamond'
}

// 分销商等级名称
export const LEVEL_NAMES = {
  [DISTRIBUTOR_LEVELS.BRONZE]: '青铜分销商',
  [DISTRIBUTOR_LEVELS.SILVER]: '白银分销商',
  [DISTRIBUTOR_LEVELS.GOLD]: '黄金分销商',
  [DISTRIBUTOR_LEVELS.DIAMOND]: '钻石分销商'
}

// 分销商等级图标
export const LEVEL_ICONS = {
  [DISTRIBUTOR_LEVELS.BRONZE]: '/static/images/distribution/bronze.png',
  [DISTRIBUTOR_LEVELS.SILVER]: '/static/images/distribution/silver.png',
  [DISTRIBUTOR_LEVELS.GOLD]: '/static/images/distribution/gold.png',
  [DISTRIBUTOR_LEVELS.DIAMOND]: '/static/images/distribution/diamond.png'
}

// 佣金状态
export const COMMISSION_STATUS = {
  PENDING: 'pending',
  SETTLED: 'settled',
  WITHDRAWN: 'withdrawn'
}

// 佣金状态名称
export const COMMISSION_STATUS_NAMES = {
  [COMMISSION_STATUS.PENDING]: '待结算',
  [COMMISSION_STATUS.SETTLED]: '已结算',
  [COMMISSION_STATUS.WITHDRAWN]: '已提现'
}

// 佣金状态样式
export const COMMISSION_STATUS_STYLES = {
  [COMMISSION_STATUS.PENDING]: {
    color: '#FFA500',
    backgroundColor: '#FFF5E6'
  },
  [COMMISSION_STATUS.SETTLED]: {
    color: '#52C41A',
    backgroundColor: '#F6FFED'
  },
  [COMMISSION_STATUS.WITHDRAWN]: {
    color: '#999',
    backgroundColor: '#F5F5F5'
  }
}

// 提现状态
export const WITHDRAW_STATUS = {
  PENDING: 'pending',
  APPROVED: 'approved',
  REJECTED: 'rejected',
  COMPLETED: 'completed'
}

// 提现状态名称
export const WITHDRAW_STATUS_NAMES = {
  [WITHDRAW_STATUS.PENDING]: '待审核',
  [WITHDRAW_STATUS.APPROVED]: '已通过',
  [WITHDRAW_STATUS.REJECTED]: '已拒绝',
  [WITHDRAW_STATUS.COMPLETED]: '已完成'
}

// 提现状态样式
export const WITHDRAW_STATUS_STYLES = {
  [WITHDRAW_STATUS.PENDING]: {
    color: '#FFA500',
    backgroundColor: '#FFF5E6'
  },
  [WITHDRAW_STATUS.APPROVED]: {
    color: '#52C41A',
    backgroundColor: '#F6FFED'
  },
  [WITHDRAW_STATUS.REJECTED]: {
    color: '#FF4D4F',
    backgroundColor: '#FFF1F0'
  },
  [WITHDRAW_STATUS.COMPLETED]: {
    color: '#1890FF',
    backgroundColor: '#E6F7FF'
  }
}

// 提现方式
export const WITHDRAW_METHODS = {
  ALIPAY: 'alipay',
  WECHAT: 'wechat',
  BANK: 'bank'
}

// 提现方式名称
export const WITHDRAW_METHOD_NAMES = {
  [WITHDRAW_METHODS.ALIPAY]: '支付宝',
  [WITHDRAW_METHODS.WECHAT]: '微信',
  [WITHDRAW_METHODS.BANK]: '银行卡'
}

// 提现方式图标
export const WITHDRAW_METHOD_ICONS = {
  [WITHDRAW_METHODS.ALIPAY]: '/static/images/distribution/alipay.png',
  [WITHDRAW_METHODS.WECHAT]: '/static/images/distribution/wechat.png',
  [WITHDRAW_METHODS.BANK]: '/static/images/distribution/bank.png'
}

// 提现方式描述
export const WITHDRAW_METHOD_DESCS = {
  [WITHDRAW_METHODS.ALIPAY]: '1-3个工作日到账',
  [WITHDRAW_METHODS.WECHAT]: '1-3个工作日到账',
  [WITHDRAW_METHODS.BANK]: '1-3个工作日到账'
}

// 素材类型
export const MATERIAL_TYPES = {
  ALL: 'all',
  PRODUCT: 'product',
  POSTER: 'poster',
  TEXT: 'text',
  VIDEO: 'video'
}

// 素材类型名称
export const MATERIAL_TYPE_NAMES = {
  [MATERIAL_TYPES.ALL]: '全部',
  [MATERIAL_TYPES.PRODUCT]: '商品图片',
  [MATERIAL_TYPES.POSTER]: '活动海报',
  [MATERIAL_TYPES.TEXT]: '推广文案',
  [MATERIAL_TYPES.VIDEO]: '视频素材'
}

// 文件类型
export const FILE_TYPES = {
  IMAGE: 'image',
  VIDEO: 'video',
  DOCUMENT: 'document',
  OTHER: 'other'
}

// 文件类型图标
export const FILE_TYPE_ICONS = {
  [FILE_TYPES.IMAGE]: '/static/images/distribution/image.png',
  [FILE_TYPES.VIDEO]: '/static/images/distribution/video.png',
  [FILE_TYPES.DOCUMENT]: '/static/images/distribution/document.png',
  [FILE_TYPES.OTHER]: '/static/images/distribution/file.png'
}

// 文件类型名称
export const FILE_TYPE_NAMES = {
  [FILE_TYPES.IMAGE]: '图片',
  [FILE_TYPES.VIDEO]: '视频',
  [FILE_TYPES.DOCUMENT]: '文档',
  [FILE_TYPES.OTHER]: '其他'
}

// 分销商升级条件
export const UPGRADE_CONDITIONS = {
  [DISTRIBUTOR_LEVELS.SILVER]: {
    totalCommission: 1000,
    teamCount: 10,
    monthlyOrders: 50
  },
  [DISTRIBUTOR_LEVELS.GOLD]: {
    totalCommission: 5000,
    teamCount: 50,
    monthlyOrders: 200
  },
  [DISTRIBUTOR_LEVELS.DIAMOND]: {
    totalCommission: 20000,
    teamCount: 200,
    monthlyOrders: 1000
  }
}

// 分销商佣金比例
export const COMMISSION_RATES = {
  [DISTRIBUTOR_LEVELS.BRONZE]: {
    level1: 10,
    level2: 5,
    level3: 2
  },
  [DISTRIBUTOR_LEVELS.SILVER]: {
    level1: 12,
    level2: 6,
    level3: 3
  },
  [DISTRIBUTOR_LEVELS.GOLD]: {
    level1: 15,
    level2: 8,
    level3: 4
  },
  [DISTRIBUTOR_LEVELS.DIAMOND]: {
    level1: 20,
    level2: 10,
    level3: 5
  }
}

// 提现限制
export const WITHDRAW_LIMITS = {
  MIN_AMOUNT: 100,
  MAX_AMOUNT: 50000,
  DAILY_LIMIT: 100000
}

// 分销说明
export const DISTRIBUTION_TIPS = [
  '佣金将在订单完成后自动结算',
  '提现最低金额为100元',
  '提现申请将在1-3个工作日内处理',
  '如有疑问请联系客服'
]

// 分销规则
export const DISTRIBUTION_RULES = [
  '成为分销商后即可获得推广资格',
  '推广商品可获得相应佣金',
  '佣金比例根据分销商等级确定',
  '佣金可随时提现到指定账户',
  '提现需满足最低金额要求',
  '如有违规行为将被取消分销资格'
] 